package com.baizhi.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class Article implements Serializable {
    private int articleId;
    private String articleName;
    private String articleImage;
    private String articleContent;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date articleDate;
    private int parentId;
    private Guru guru;

    @Override
    public String toString() {
        return "Article{" +
                "articleId=" + articleId +
                ", articleName='" + articleName + '\'' +
                ", articleImage='" + articleImage + '\'' +
                ", articleContent='" + articleContent + '\'' +
                ", articleDate=" + articleDate +
                ", parentId=" + parentId +
                ", guru=" + guru +
                '}';
    }

    public int getArticleId() {
        return articleId;
    }

    public void setArticleId(int articleId) {
        this.articleId = articleId;
    }

    public String getArticleName() {
        return articleName;
    }

    public void setArticleName(String articleName) {
        this.articleName = articleName;
    }

    public String getArticleImage() {
        return articleImage;
    }

    public void setArticleImage(String articleImage) {
        this.articleImage = articleImage;
    }

    public String getArticleContent() {
        return articleContent;
    }

    public void setArticleContent(String articleContent) {
        this.articleContent = articleContent;
    }

    public Date getArticleDate() {
        return articleDate;
    }

    public void setArticleDate(Date articleDate) {
        this.articleDate = articleDate;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public Guru getGuru() {
        return guru;
    }

    public void setGuru(Guru guru) {
        this.guru = guru;
    }

    public Article() {
    }

    public Article(int articleId, String articleName, String articleImage, String articleContent, Date articleDate, int parentId, Guru guru) {
        this.articleId = articleId;
        this.articleName = articleName;
        this.articleImage = articleImage;
        this.articleContent = articleContent;
        this.articleDate = articleDate;
        this.parentId = parentId;
        this.guru = guru;
    }
}
